<?php
declare (strict_types=1);

namespace app\portal\controller;

use app\BaseController;
use app\model\PortalArticle;
use think\Request;

class Article extends BaseController
{
    /**
     * @param Request $request
     * @return string
     */
    public function index(Request $request): string
    {
        $aid = $request->param('aid');
        $_G = $request->param();

        $_G['article'] = PortalArticle::cache(600)->find($aid);
        $_G['menu'] = $_G['article']->menu;

        $this->assign('_G', $_G);
        return $this->fetch("/article");
    }

}
